<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Calendar" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.util.Locale" %>
<%--
  Created by IntelliJ IDEA.
  User: xujc
  Date: 6/14/15
  Time: 17:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" errorPage="error.jsp" %>

<html>
<head>
    <title>时间显示</title>
</head>
<body>
<div id="header">
    <h1>第一题:</h1>
    <%=(new SimpleDateFormat("你好现在是yyyy年MM月dd日EEEE,HH时mm分ss秒", Locale.CHINA)).format(new Date(Calendar.getInstance().getTimeInMillis()))%>
    <h1>第二题:</h1>
    <%=(Calendar.getInstance().get(Calendar.HOUR_OF_DAY)<12)?"12点以前,上午好":"12点以后,下午好"%>
    <%=1/0%>
</div>

</body>
</html>
